import { createRouter,createWebHashHistory,} from 'vue-router'
import {delData} from '../compostion/useRef'
import routes from "./router"
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

router.beforeEach((to,from)=>{
  if(to.fullPath !== from.fullPath){
    delData()
  }
})

router.beforeEach((to,from)=>{

  document.querySelector("title").text = to.meta.title;


})


export default router;
